extends PopupMenu

const handles = ['new_level', 'open_level', 'save_level', 'close_level']

func _on_id_pressed(id: int) -> void:
	if id >= len(handles):
		push_error("can't handle %d" % id)
		return
	
	var h = Callable(self,handles[id-1])
	h.call()

func new_level() -> void:
	print('新建操作')

func open_level() -> void:
	print('打开操作')

func save_level() -> void:
	print('保存操作')
	
func close_level() -> void:
	print('关闭操作')


func _on_help_id_pressed(id: int) -> void:
	pass # Replace with function body.
